package com.demo.bookstore.utils;


import com.demo.bookstore.model.base.Response;

public class ResponseUtil {

    public static <T> Response<T> ok(T data) {
        return Response.<T>builder().code(0).msg("成功").data(data).build();
    }

    public static <T> Response<T> fail() {
        return Response.<T>builder().code(-1).msg("失败").build();
    }
}
